package com.whmskj.xjlhbc.domain;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.util.StringUtils;

/**
 * 空压机
 */
@Data
@Schema(name = "空压机",description = "空压机")
@TableName(value = "kyj_bc_real")
public class MesKyj{
    @Schema(description = "")
    private String mid;
    @Schema(description = "")
    private String createDate;
    @Schema(description = "")
    private String creator;
    @Schema(description = "")
    private String equipment;
    @Schema(description = "")
    private String airPressure;
    @Schema(description = "")
    private String errorStatus;
    @Schema(description = "")
    private String airTemperature;
    @Schema(description = "")
    private String frequency;
    @Schema(description = "")
    private String current;
    @Schema(description = "")
    private String motorPower;
    @Schema(description = "")
    private String busVoltage;
    @Schema(description = "")
    private String runStatus;
    @Schema(description = "保养状态")
    private String maintainStatus;
    @Schema(description = "累计运行时间")
    private String runTime;
    @Schema(description = "")
    private String fanACurrent;
    @Schema(description = "")
    private String fanBCurrent;
    @Schema(description = "")
    private String fanCCurrent;
    @Schema(description = "主机给定")
    private String motorPreset;
    @Schema(description = "风机给定")
    private String fanPreset;
    @Schema(description = "")
    private String constantPressure;
    @Schema(description = "")
    private String upperPressure;
    @Schema(description = "")
    private String floorPressure;
    @Schema(description = "")
    private String constantTemp;
    @Schema(description = "")
    private String ceilingTemp;
    @Schema(description = "")
    private String floorTemp;
    @Schema(description = "电机上限频率")
    private String motorFrequencyMax;
    @Schema(description = "电机下限频率")
    private String motorFrequencyMix;
    @Schema(description = "维护当前值")
    private String maintainCurrentValue;
    @Schema(description = "维护设定值")
    private String maintainSetValue;
    @Schema(description = "")
    private String mgEquipmentRuntime;
    @Schema(description = "")
    private String lng;
    @Schema(description = "")
    private String lat;
    @Schema(description = "")
    private String runStatusDetail;
    @Schema(description = "")
    private String runStatusRemark;
    @Schema(description = "")
    private String enterprise;
    @Schema(description = "")
    private String record_time;
    @Schema(description = "")
    private String id;
    @Schema(description = "")
    private String stationNumber;

    @TableField(exist = false)
    private String cs = "鲍斯";

    public String getCreateDate() {
        if(!StringUtils.hasText(createDate))
            return createDate;
        return DateUtil.date(NumberUtil.parseLong(createDate)).toString();
    }
}
